<?php $this->import('Header') ?>
<?php $this->import('Dog/TopInfo') ?>
<div class="container">
	<div class="row photo-detail">
		<div class="col-xs-8">
			<div class="show-box">
				<div class="share">
					<div class="social-info">
                        <a id="js-show-comment-count" href="javascript:;">评论（）</a> | &nbsp;<a href=""><i class="glyphicon glyphicon-heart"></i> 喜欢（1）</a>
                        <?php if ($_currentUserInfo && $_currentUserInfo['UserId'] == $userInfo['UserId']) { ?>
                            | &nbsp;<a class="js-edit-btn" href="javascript:;" photoId="<?php echo $detail['PhotoId'] ?>"><i class="glyphicon glyphicon-edit"></i> 编辑 </a>
                        <?php } ?>
                    </div>
					<div class="bdsharebuttonbox"><a href="#" class="bds_more" data-cmd="more"></a><a href="#" class="bds_qzone" data-cmd="qzone"></a><a href="#" class="bds_tsina" data-cmd="tsina"></a><a href="#" class="bds_tqq" data-cmd="tqq"></a><a href="#" class="bds_renren" data-cmd="renren"></a><a href="#" class="bds_weixin" data-cmd="weixin"></a></div>
					<script>window._bd_share_config={"common":{"bdSnsKey":{},"bdText":"","bdMini":"2","bdPic":"","bdStyle":"0","bdSize":"16"},"share":{},"image":{"viewList":["qzone","tsina","tqq","renren","weixin"],"viewText":"分享到：","viewSize":"16"},"selectShare":{"bdContainerClass":null,"bdSelectMiniList":["qzone","tsina","tqq","renren","weixin"]}};with(document)0[(getElementsByTagName('head')[0]||body).appendChild(createElement('script')).src='http://bdimg.share.baidu.com/static/api/js/share.js?v=89860593.js?cdnversion='+~(-new Date()/36e5)];</script>
				</div>
                <div class="tit"><h4 id="js-detail-title" class="text-info"><?php echo $detail['Title'] ?></h4></div>
				<div class="img-box">
					<img id="js-detail-img" src="<?php echo \Util\User::getUserPhotoRectangle($detail['Path'], 1200) ?>" />
				</div>
                <div class="tit"><span id="js-detail-desc"><?php echo $detail['Desc'] ?></span></div>
			</div>
			<div id="js-detail-box"></div>
		</div>
		<div class="col-xs-4">
			<div class="other-photo">
				<div class="ui">
					<img class="" src="<?php echo !empty($userInfo['Photo']) ? \Util\User::getUserPhoto($userInfo['Photo'], 200, 200) : '/Resource/images/nohead_new.jpg'; ?>" />
					<div class="txt">
						<a class="uname" href="/dog_u<?php echo $userInfo['UserId'] ?>.html"><?php echo !empty($userInfo['Username']) ? $userInfo['Username'] : $userInfo['Email'] ?></a><br />
						<span class="breed"><?php echo $userInfo['breed'] ?></span>
					</div>
				</div>
				<div class="u-pic">
					<?php foreach ($userPhotos as $photo) { ?>
						<div class="item">
							<a href="/dog/photo/detail_<?php echo $photo['PhotoId'] ?>.html"><img src="<?php echo \Util\User::getUserPhotoRectangle($photo['Path'], 400) ?>" /></a>
							<div class="cover"></div>
						</div>
					<?php } ?>
				</div>
				<div class="do">
					<div class="btn-group">
						<a href="" class="btn btn-default">关注Ta</a>
						<a href="/dog/morephoto_<?php echo $detail['UserId'] ?>.html" class="btn btn-danger">全部照片</a>
					</div>
				</div>
			</div>
		</div>
	</div>
</div>
<?php $this->import('Footer') ?>
<script>
	seajs.init({
		photoId: <?php echo $detail['PhotoId'] ?>,
		userId: <?php echo $userInfo['UserId'] ?>
	});
</script>